import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// Ant-Design-Vue
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';
// axios
import axios from 'axios'
// qs
import qs from 'qs'

//将axios挂到vue.prototype.$http这个原型上
Vue.prototype.$http = axios

// 挂载qs插件
Vue.prototype.$qs = qs

// antd
Vue.use(Antd)

Vue.config.productionTip = false

// axios拦截器
axios.interceptors.request.use(config => {
    config.headers.Authorization = window.sessionStorage.getItem('token')
    return config
})

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')